package com.rockcent.mall.lib.domain;

import com.rockcent.common.domain.IDEntityMall;
import com.rockcent.common.domain.enumclass.Whether;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;

/**
 * Created by marco on 2017/5/25.
 */
@Entity
@Table(name = "message_reply_rule_keyword")
@DynamicInsert
@DynamicUpdate
public class MessageReplyRuleKeyword extends IDEntityMall {

    @Column(columnDefinition = "bigint(20) comment '规则ID'")
    private Long messageReplyRuleId;
    @Column(columnDefinition = "varchar(100) comment '关键词'")
    private String keyword;
    @Column(columnDefinition = "varchar (20) default 'NO' comment '是否是全匹配模式 (是:YES,否:NO)'")
    @Enumerated(EnumType.STRING)
    protected Whether allMatch = Whether.NO;

    public Long getMessageReplyRuleId() {
        return messageReplyRuleId;
    }

    public void setMessageReplyRuleId(Long messageReplyRuleId) {
        this.messageReplyRuleId = messageReplyRuleId;
    }

    public String getKeyword() {
        return keyword;
    }

    public void setKeyword(String keyword) {
        this.keyword = keyword;
    }

    public Whether getAllMatch() {
        return allMatch;
    }

    public void setAllMatch(Whether allMatch) {
        this.allMatch = allMatch;
    }

    @Override
    public String toString() {
        return "MessageReplyRuleKeyword{" +
                "messageReplyRuleId=" + messageReplyRuleId +
                ", keyword='" + keyword + '\'' +
                ", id=" + id +
                ", allMatch=" + allMatch +
                '}';
    }
}
